<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Document</title>
    <script src="../vue.js"></script>
  </head>

  <body>
    <div id="app">
      <button @click="isRain=!isRain">下雨/不下雨</button>
      <h1 v-show="isRain">今天下雨记得带伞</h1>
      <h1 v-show="!isRain">今天晴天</h1>
    </div>
    <script>
      Vue.config.productionTip = false;

      const vm = new Vue({
        el: "#app",
        data() {
          return {
            isRain: true,
          };
        },
      });
    </script>
  </body>
</html>
